<template>
	<view class="chooseSource">
		<cu-custom bgColor="bg-gradual-blue" :isBack="true">
			<block slot="content">选择播放源</block>
		</cu-custom>
		<view class="cu-bar bg-white solid-bottom margin-top">
			<view class="action">
				<text class="cuIcon-title text-orange "></text> 播放源列表（当播放源失效请返回切换播放源）
			</view>
		</view>
		<view class="cu-list menu">
			<view class="cu-item" v-for="(item,index) in sourceList" :key="index" @click="toPlay(item.url)">
				<view class="content">
					<text class="cuIcon-circlefill text-grey"></text>
					<text class="text-grey">播放源{{index+1}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				sourceList: [{
						url: 'https://660e.com/?url=',
					},
					{
						url: 'http://api.ledboke.com/?url='
					},
					{
						url: 'http://wq114.org:88/yun.php?url='
					},
					{
						url: 'https://jx.daheiyun.com/?url='
					},
				],
				url: '', //视频播放url
			}
		},
		onLoad(option) {
			let {
				url
			} = option
			this.url = url
		},
		methods: {
			toPlay(source) {
				uni.navigateTo({
					url: '/subFirst/playVideo/playVideo?url=' + this.url + '&source=' + source
				})
			}
		}
	}
</script>

<style>
</style>
